import fetch from '@/axios'

/**
 * 获得用户信息
 */
export const fileUpload = (files) => {
    return fetch({
        url: 'admin/material/upload',
        method: 'post',
        headers: {'Content-Type': 'multipart/form-data'},
        data: files,
        onUploadProgress: function (progressEvent) { //原生获取上传进度的事件
            if (progressEvent.lengthComputable) {
                // 处理上传进度
            }
        }
    })
}